<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
//        1、交换两个变量的值
//        let a = 12, b = 22;
//        [a, b] = [b, a];
//        document.writeln(`a = ${a} b = ${b}`);

//        ----------------------------------------
//        2、应用函数返回多个值
//        function sum(a, b, c){
//            return {ab: a + b, ac: a + c, bc: b + c};
//        }
//        let {ab, bc, ac} = sum(2,3,4);
//        document.writeln(`ac = ${ac}`);     //ac = 6
    </script>
</head>
<body>

</body>
</html>